package com.logwire.dto;import lombok.Data;/** * @author yhou * @ProjectName yhou-api * @description * @date 2022/11/07 7:17 PM */@Datapublic class ApiResult<T> {	private int code;	private String message;	private T data;	public static <T> ApiResult<T> success(T data) {		ApiResult<T> result = new ApiResult<>();		result.setCode(20000);		result.setMessage("OK!");		result.setData(data);		return result;	}	public static <T> ApiResult<T> success() {		ApiResult<T> result = new ApiResult<>();		result.setCode(20000);		result.setMessage("OK!");		return result;	}	public static ApiResult fail(Integer code, String message) {		ApiResult<Object> result = new ApiResult<>();		result.setCode(code);		result.setMessage(message);		return result;	}}